class Solution(object):
    def missingRolls(self, rolls, mean, n):
        m = len(rolls)
        sum_n = mean * (m + n) - sum(rolls)
        if sum_n < n or sum_n > 6 * n:
            return []
        else:
            ans = [0] * n
            for i in range(n):
                ans[i] = min(sum_n - (n - 1 - i), 6)
                sum_n -= ans[i]
            return ans